<script type="text/javascript" src="<?php echo BASE_URL;?>layouts/backend/default/js/plugins/jquery.validate.min.js"></script>
<script type="text/javascript" src="<?php echo BASE_URL;?>layouts/backend/default/js/plugins/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="<?php echo BASE_URL;?>layouts/backend/default/js/plugins/charCount.js"></script>
<script type="text/javascript" src="<?php echo BASE_URL;?>layouts/backend/default/js/plugins/ui.spinner.min.js"></script>
<script type="text/javascript" src="<?php echo BASE_URL;?>layouts/backend/default/js/custom/forms.js"></script>
<div class="vernav">
    <ul>
        <li class="current"><a href="<?php echo site_url('backend/settings/main'); ?>" class="editor">Main Settings</a></li>
        <li><a href="newpost.html">Templates</a></li>
        <li><a href="#">Modules</a></li>
        <li><a href="#">Statistic</a></li>
        <li><a href="#">Utilities</a></li>
    </ul>
    <a class="togglemenu"></a>
</div><!--leftmenu-->

<div class="centercontent">
    <div class="pageheader">
        <h1 class="pagetitle">Main Settings</h1>
        <span class="pagedesc">The content below are loaded using inline data</span>
    </div><!--pageheader-->
    <div id="contentwrapper" class="contentwrapper">
        <div id="basicform" class="subcontent">
            <!-- notification msgerror -->
            <?php 
            if(validation_errors()) {
                echo '<div class="notibar msgerror"><a class="close"></a><p>'.validation_errors().'</p></div>';
            }
            ?>
            
            <form class="stdform" action="<?php echo BASE_URL; ?>backend/settings/main" method="post">
                <p>
                    <label>Site Title:</label>
                    <span class="field"><input type="text" class="mediuminput" name="site_name" id="site_name" value="<?php echo (isset($settings['site_name'])) ? form_prep($settings['site_name']) : ''; ?>" /></span>
                    <small class="desc">The title of your website.</small>
                </p>
                <p>
                    <label>Site Keywords:</label>
                    <span class="field"><input type="text" class="mediuminput" name="site_keywords" id="site_keywords" value="<?php echo (isset($settings['site_keywords'])) ? form_prep($settings['site_keywords']) : ''; ?>" /></span>
                    <small class="desc">Meta keywords for SEO.</small>
                </p>
                <p>
                    <label>Site Description:</label>
                    <span class="field"><input type="text" class="mediuminput" name="site_description" id="site_description" value="<?php echo (isset($settings['site_description'])) ? form_prep($settings['site_description']) : ''; ?>" /></span>
                    <small class="desc">Meta description of your site.</small>
                </p>
                <p>
                    <label>Email:</label>
                    <span class="field"><input type="text" class="mediuminput" name="site_email" id="site_email" value="<?php echo (isset($settings['site_email'])) ? form_prep($settings['site_email']) : ''; ?>" /></span>
                    <small class="desc">The Administrator's email.</small>
                </p>
                <p>
                    <label>Max Search Results</label>
                    <span class="field"><input type="text" class="mediuminput" name="max_search" id="max_search" value="<?php echo (isset($settings['max_search'])) ? form_prep($settings['max_search']) : ''; ?>" /></span>
                    <small class="desc">Max result allowed in search page.</small>
                </p>
                <p>
                    <label>Allow Comments</label>
                    <span class="field">
                    <select name="comments">
                        <option value="Y"value="Y"<?php echo (isset($settings['comments']) && $settings['comments'] == 'Y') ? ' selected' : ''; ?>>Yes</option>
                        <option value="N"value="N"<?php echo (isset($settings['comments']) && $settings['comments'] == 'N') ? ' selected' : ''; ?>>No</option>
                    </select>

                    </span>
                </p>
                <p>
                    <label>Cache time</label>
                    <span class="field"><input type="text" class="width50 noradiusright" name="cache_time" id="cache_time" value="<?php echo (isset($settings['cache_time'])) ? form_prep($settings['cache_time']) : ''; ?>" /></span>
                    <small class="desc">The number of minutes you wish page to remains cached.</small>
                </p>
                <?php $this->core_events->trigger('settings/form');?>
                <p class="stdformbutton">
                    <button class="submit radius2">Submit Button</button>
                    <input type="reset" class="reset radius2" value="Reset Button" />
                </p>
            </form>
        </div>
    </div>
</div><!--centercontent-->